package com.gs.netty.core.common;

import java.util.ArrayList;
import java.util.LinkedList;

public interface CommandConstants{

    // 版本
     int VERSION =1;

    public String[] INTERIOR_COMMANDS = new String[] {
            CommandConstants.USER_EVENT,
            CommandConstants.EXCEPTION_CAUGHT,
            CommandConstants.CHANNEL_ACTIVE,
            CommandConstants.CHANNEL_INACTIVE
    };

    /**
     * 用户事件
     */
    String USER_EVENT ="userEventTriggered";
    /**
     * 异常事件
     */
    String EXCEPTION_CAUGHT ="exceptionCaught";
    /**
     * channel激活事件
     */
    String CHANNEL_ACTIVE ="channelActive";
    /**
     * channel关闭事件
     */
    String CHANNEL_INACTIVE ="channelInactive";

    String OK ="200";
    String NO_FOUND_HANDLER ="404";
     static LinkedList<String> CP_COMMANDS(){
        LinkedList<String> result = new LinkedList<>();
        for (String interiorCommand : INTERIOR_COMMANDS) {
            result.add(interiorCommand);
        }
        return result;
    }

}
